<template>
  <div class="affairs-feedback">
    <el-form :model="formData" ref="form" :rules="rules" label-width="120px">
      <div class="form-section">
        <h3>处理反馈</h3>
        
        <el-form-item label="处理结果" prop="result">
          <el-radio-group v-model="formData.result">
            <el-radio label="resolved">已解决</el-radio>
            <el-radio label="partially">部分解决</el-radio>
            <el-radio label="unresolved">未解决</el-radio>
          </el-radio-group>
        </el-form-item>

        <el-form-item label="反馈说明" prop="feedback">
          <el-input
            type="textarea"
            v-model="formData.feedback"
            :rows="4"
            placeholder="请详细描述反馈内容">
          </el-input>
        </el-form-item>

        <el-form-item label="后续建议" prop="suggestions">
          <el-input
            type="textarea"
            v-model="formData.suggestions"
            :rows="4"
            placeholder="请提出后续处理建议">
          </el-input>
        </el-form-item>
      </div>

      <div class="form-actions">
        <el-button @click="prevStep">上一步</el-button>
        <el-button type="primary" @click="submitForm">下一步</el-button>
      </div>
    </el-form>
  </div>
</template>

<script>
export default {
  name: 'AffairsFeedback',
  data() {
    return {
      formData: {
        result: '',
        feedback: '',
        suggestions: ''
      },
      rules: {
        result: [{ required: true, message: '请选择处理结果', trigger: 'change' }],
        feedback: [{ required: true, message: '请输入反馈说明', trigger: 'blur' }]
      }
    }
  },
  methods: {
    prevStep() {
      this.$emit('prev-step')
    },
    submitForm() {
      this.$refs.form.validate(valid => {
        if (valid) {
          this.$emit('next-step', this.formData)
        }
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.affairs-feedback {
  .form-section {
    margin-bottom: 30px;
    
    h3 {
      margin: 0 0 20px;
      padding-left: 10px;
      border-left: 4px solid #409EFF;
      font-size: 18px;
      font-weight: 500;
      color: #303133;
    }
  }

  .form-actions {
    text-align: center;
    margin-top: 40px;
  }
}
</style> 